#include <behaviortree_cpp/bt_factory.h>
#include <fishbot_behavior_tree/behavior_context.hpp>
#include "fishbot_navigation_behaviors/nav2pose_action_client.hpp"
#include "fishbot_navigation_behaviors/set_initial_pose.hpp"
#include "fishbot_navigation_behaviors/set_area_param.hpp"


namespace fishbot::behaviors
{
    class NavigationBehaviorLoader : public fishbot::behavior_tree::SharedResourcesNodeLoaderBase
    {
    public:
        void registerBehaviors(BT::BehaviorTreeFactory &factory,
                               const std::shared_ptr<fishbot::behavior_tree::BehaviorContext> &shared_resources) override
        {
            fishbot::behavior_tree::registerBehavior<Nav2PoseActionClient>(factory, "Navigate2Pose", shared_resources);
            fishbot::behavior_tree::registerBehavior<SetInitialPose>(factory, "PublishNavInitialPose", shared_resources);
            fishbot::behavior_tree::registerBehavior<SetAreaParam>(factory, "SetAreaParam", shared_resources);
        }
    };
}

#include <pluginlib/class_list_macros.hpp>
PLUGINLIB_EXPORT_CLASS(fishbot::behaviors::NavigationBehaviorLoader, fishbot::behavior_tree::SharedResourcesNodeLoaderBase)